package com.aidong.carnival.dao;


import org.apache.ibatis.annotations.Param;

import com.aidong.carnival.entity.TrnInvitationCode;


public interface InvitationDao {
	/**
	 * 根据邀请码判断该邀请码是否正确
	 * @param code
	 * @return
	 */
	public String  checkInvitation();
	/**
	 * 保存该邀请码用户信息
	 * @param invitation
	 */
	public void addInvitation(TrnInvitationCode invitation);
	
	/**
	 * 根据手机号查看是否有填写过邀请码
	 * @param phone
	 * @return
	 */
	public int getInvitationCount(@Param("phone") String phone,@Param("activitId") int activitId);
	
	public int getInvitationCounts(@Param("code") String code,@Param("activitId") int activitId,@Param("phone") String phone);
	
	public int getCampaignByPhone(@Param("phone") String phone,@Param("activitId") int activitId);
	
	public int getInvitationByPhone(@Param("code") String code,@Param("phone") String phone);
}
